class BaiduOCRConfig:
    """
    百度OCR服务的配置类。
    """
    # TODO: 请替换为自己的 API Key 和 Secret Key
    API_KEY = "1khbnimyzjgQnVGn5h19Ww3l"
    SECRET_KEY = "zge0HIzj9OGu5GRFoGgh5vp8Uafxr4mt"

    OCR_API_BASE_URL = "https://aip.baidubce.com/rest/2.0/ocr/v1"
    OAUTH_BASE_URL = "https://aip.baidubce.com/oauth/2.0/token"

def with_config(config_class):
    """
    一个装饰器，将配置类的属性注入到目标类中。
    """
    def decorator(cls):
        for attr_name in dir(config_class):
            if not attr_name.startswith('__'):
                setattr(cls, attr_name, getattr(config_class, attr_name))
        return cls
    return decorator
